// run: $exec < input
// opt: 0
// flag: -g
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
std::vector<std::string> ans;

int const maxn = 100007;
bool vis[maxn][2];
std::string s;

void dfs(int pos, int len)
{
	if (vis[pos][len & 1] || pos - len < 5) return;
	vis[pos][len & 1] = true;
	std::string t1(s.begin() + pos - len, s.begin() + pos);
	std::string t2(s.begin() + pos - 2 * len, s.begin() + pos - len);
	ans.push_back(t1);
	if (t1 != t2) dfs(pos - len, len);
	dfs(pos - len, 5 - len);
}

int main()
{
	std::ios::sync_with_stdio(false);
	std::cin >> s;
	int n = s.size();
	dfs(n, 2); dfs(n, 3);
	std::sort(ans.begin(), ans.end());
	ans.erase(std::unique(ans.begin(), ans.end()), ans.end());
	std::cout << ans.size() << '\n';
	for (auto i : ans) std::cout << i << '\n';
}

